<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<div>
	<div class="statTitle">按省份统计问卷数量和所占比例</div>
	<table bgcolor="#AAAAAA" border="0" cellspacing="1" cellpadding="2">
		<tbody bgcolor="#DDDDDD" align="center">
			<tr class="tableTitle">
				<td>省份</td>
				<td>数量</td>
				<td>所占比例</td>
			</tr>
		</tbody>
		<tbody bgcolor="#FFFFFF">
		<c:forEach items="${result.province}" var="prov">
			<tr>
				<td>${prov[0]}</td>
				<td>${prov[1]}</td>
				<td>
				<c:choose>
					<c:when test="${result.count == 0}">
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">0</fmt:formatNumber>
					</c:when>
					<c:otherwise>
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">${prov[1]/result.count}</fmt:formatNumber>
					</c:otherwise>
				</c:choose>
				</td>
			</tr>
		</c:forEach>
		</tbody>
		<tbody bgcolor="#DDDDDD">
			<tr class="tableFooter">
				<td align="center">合计</td>
				<td>${result.count}</td>
				<td>
					100%
				</td>
			</tr>
		</tbody>
	</table>
</div>
<div>
	<div class="statTitle">按地区统计问卷数量和所占比例</div>
	<table bgcolor="#AAAAAA" border="0" cellspacing="1" cellpadding="2">
		<tbody bgcolor="#DDDDDD" align="center">
			<tr class="tableTitle">
				<td>地区</td>
				<td>数量</td>
				<td>所占比例</td>
			</tr>
		</tbody>
		<tbody bgcolor="#FFFFFF">
		<c:forEach items="${result.parts}" var="part">
			<tr>
				<td>${part[0]}</td>
				<td>${part[1]}</td>
				<td>
				<c:choose>
					<c:when test="${result.count == 0}">
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">0</fmt:formatNumber>
					</c:when>
					<c:otherwise>
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">${part[1]/result.count}</fmt:formatNumber>
					</c:otherwise>
				</c:choose>
				</td>
			</tr>
		</c:forEach>
		</tbody>
		<tbody bgcolor="#DDDDDD">
			<tr class="tableFooter">
				<td align="center">合计</td>
				<td>${result.count}</td>
				<td>
					100%
				</td>
			</tr>
		</tbody>
	</table>
</div>
				